package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.impl.OrderStatisticsServiceImpl;
import com.atguigu.spzx.common.result.Result;
import com.atguigu.spzx.manager.vo.orderStatistics.OrderStatisticsReqVo;
import com.atguigu.spzx.manager.vo.orderStatistics.OrderStatisticsRespVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * OrderStatisticsController
 * </p>
 *
 * @author flyduck
 * @since 2023/11/2
 */
@Api(tags = "订单管理接口")
@RestController
@RequestMapping("/admin/order/orderStatistics")
public class OrderStatisticsController {

    @Autowired
    private OrderStatisticsServiceImpl orderStatisticsService;

    @ApiOperation("订单统计")
    @GetMapping("/statisticsOrderByQuery")
    public Result<OrderStatisticsRespVo> statisticsOrderByQuery(OrderStatisticsReqVo reqVo){
        OrderStatisticsRespVo respVo = orderStatisticsService.statisticsOrderByQuery(reqVo);
        return Result.ok(respVo);
    }
}
